/*
    The I Ching (the Book of Changes) plasmoid.
    Copyright (C) 2002-2009 Jean Pierre Charalambos.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/

// Here we avoid loading the header multiple times
#ifndef ICHING_HEADER
#define ICHING_HEADER

// Qt
class QGraphicsLinearLayout;

// kde
// PLASMA
// 1. General puprpose:
#include <Plasma/PopupApplet>
#include <Plasma/DataEngine>
// 2. Widgets:
namespace Plasma {
    class TabBar;
    class WebView;
    class spinBox;
    //test:
    class ToolButton;
    class ScrollWidget;
    class Label;
    class ComboBox;
    class Frame;
}

// local includes
class Hexagram;
class Relationship;
class LineButtonGroupGenerator;
class AbstractGenerator;

// Config dialogs
#include "ui_translatorselectorform.h"

// Define our plasma Applet
class iching : public Plasma::PopupApplet {
        Q_OBJECT
    public:
        // Basic Create/Destroy
        iching ( QObject *parent, const QVariantList &args );
        ~iching();
        QGraphicsWidget *graphicsWidget();
        void init();

        /**
            void readConfig();
            void writeConfig();
        public slots:
            void configAccepted();
        */

    protected:
        void createConfigurationInterface ( KConfigDialog *parent );

    private:
        QGraphicsWidget *m_graphicsWidget;
        Plasma::TabBar* tabs;
        Plasma::ScrollWidget* hexGenTab;
        //QGraphicsWidget * hexGenTab;
        Plasma::WebView* hexWebTab;
        Plasma::Label *label;
        Plasma::ToolButton * toolButton;
        //Plasma::IconWidget * iconWidget;
        Plasma::ComboBox * comboBox;
        Plasma::Frame *header;
        QGraphicsLinearLayout * bigLayout;
        Ui::TranslatorSelectorForm ts_ui;
        QString translator;
        Hexagram * hexagram;
        Relationship * relation;
        AbstractGenerator * lineGenerator;
        void test();
};

// This is the command that links your applet to the .desktop file
K_EXPORT_PLASMA_APPLET ( iching, iching )
#endif
